package kin.controller.system;






import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;

import kin.bean.system.Result;
import kin.manager.security.ModuleManager;
import kin.system.util.ApplicationContextHelper;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.springframework.orm.hibernate4.LocalSessionFactoryBean;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

@Controller
@RequestMapping("/aaa")
public class ExceptionController {

	
	@ResponseBody 
	@RequestMapping(value="/ccc")
	public Object list(HttpServletRequest req) {
		 System.out.println("ccc"); 
	     Result r=new Result();
	    
	     //OpenSessionInViewInterceptor
	   //this.g
	   /*  if(ApplicationContextHelper.getBean("userManagerIMP")!=null){
	    	 System.out.println("yes");
	     }else{
	    	 System.out.println("no");
	     }*/

	     //WebApplicationContextUtils.g
	    // WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(req.getServletContext());
			// wac.getBean("&sessionFactory");
	//LocalSessionFactoryBean ass = (LocalSessionFactoryBean)ApplicationContextHelper.getBean("&sessionFactory");
	    // WebApplicationContext wac=  WebApplicationContextUtils.getWebApplicationContext(req.getServletContext()..g, WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
	     
	     //lp.configure(props)
	 
	   
	 return r;
	}


	
	
	
}
